package com.example.petmall.seckill.schdeuling;

import lombok.extern.slf4j.Slf4j;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.stereotype.Component;

/**
 * @author liang zai
 * @date 2022/5/23 17:19
 * @description
 */
//EnableScheduling 开启定时任务
@EnableScheduling
@Component
@Slf4j
@EnableAsync
public class HelloSchedule {

//    @Scheduled(cron = "* * * ? * 1")
//    @Async
//    public void schedule() throws InterruptedException {
//      log.info("hello.....");
//      Thread.sleep(3000);
//    }
}
